﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SShortMapEntity extends IMessageBase
    {
        public var entityId:SEntityId;
        public var code:int;
        public var ownerEntityId:SEntityId;
        public var name:String;
        public var force:int;
        public var fightMode:int;
        public var guildId:SEntityId;
        public var camp:int;
        public var groupId:SEntityId;
        public var reserveJs:String;
        public var point:SPoint;
        public const _type:int = 36;
        public static var _regist:SShortMapEntity = new SShortMapEntity(true);

        public function SShortMapEntity(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SShortMapEntity();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            param1.writeInt(this.code);
            this.ownerEntityId.__write(param1);
            param1.writeString(this.name);
            param1.writeByte(this.force);
            param1.writeByte(this.fightMode);
            this.guildId.__write(param1);
            param1.writeByte(this.camp);
            this.groupId.__write(param1);
            param1.writeString(this.reserveJs);
            this.point.__write(param1);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.code = param1.readInt();
            this.ownerEntityId = new SEntityId();
            this.ownerEntityId.__read(param1);
            this.name = param1.readString();
            this.force = param1.readByte();
            this.fightMode = param1.readByte();
            this.guildId = new SEntityId();
            this.guildId.__read(param1);
            this.camp = param1.readByte();
            this.groupId = new SEntityId();
            this.groupId.__read(param1);
            this.reserveJs = param1.readString();
            this.point = new SPoint();
            this.point.__read(param1);
            return;
        }// end function

    }
}
